import { BaseService } from 'egg-cool-service';

export default class Plan extends BaseService {

    async info() {
        const query = this.getQuery();
        return await this.getRepo().Plan.findOne({
            id: query.id,
            relations: [ 'products' ],
        });
    }

    async list () {
        return await this.getRepo().Plan.find({
            relations: [ 'products' ],
        });
    }
}
